const whiteList = {}
whiteList.needAdmin = function (ctx, next) {
    if (ctx.jwtData) {
        if (ctx.jwtData.userRole === 1) {
            throw {code: 403, message: '无操作权限'}
        }
    } else {
        throw {code: 401, message: '请登录'}
    }
}

module.exports = whiteList
